<%@ page import="com.wuchao.service.serviceImpl.ServiceImpl" %>
<%@ page import="com.wuchao.entity.User" %>
<%@ page import="java.util.List" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>Title</title>
    <style>

    </style>
</head>
<body>
<h1>欢迎来到修改页面</h1>
<%--//修改用表单--%>
<form method="get" action="${pageContext.request.contextPath}/ServleUser">

    <table border="4">
        <c:forEach items="${list}" var="user">
        <tr>
            <th>姓名 <input type="text" value="${user.name}" name="name"></th>
        </tr>
        <tr>
            <th>男<input type="radio"  ${user.sex==1?"checked":""}  value="1" name="sex">
                女<input type="radio" ${user.sex==1?"":"checked"}  value="2" name="sex">
            </th>
        </tr>
        <tr>
            <th>爱好 <%--k-v--%>
                <select name="hobby">
                    <option value="打麻将"  ${user.hobby.equals("打麻将")?"SELECTED":""}>打麻将</option>
                    <option value="做核算吧" ${user.hobby.equals("做核算吧")?"SELECTED":""}>做核算吧</option>
                    <option value="打针" ${user.hobby.equals("打针")?"SELECTED":""}>打针</option>
                </select>
            </th>
        </tr>
            <input type="hidden" name="op" value="update2">
            <input type="hidden" name="id" value="${user.id}">
        </c:forEach>
    </table>

    <input type="submit" value="提交">
</form>
<script src="../js/jquery.js"></script>
<script>

</script>
</body>
</html>
